package com.erb.service.llb;

import com.erb.entity.Invest;

import java.sql.Timestamp;
import java.util.List;
import java.util.Map;

public interface InvestService {
	int addInvest(Invest invest);

	List<Invest> findByStatus(int status);

	List<Invest> findByPid(int pid);

	int updateStatus(int id, int status);

	int batchUpdateStatus(int oldStatus, int newStatus);

	int updateStatusByPid(int pid, int status);

	int updateLastProfitDate(int id, Timestamp lastProfitDate);

	Double countInvestMoney();

	//该项目类型的投资人数
	int sumUsersByProType(int type);

	int sumInvest();

	//int countInvestByMoney(int pid,Integer minMoney,Integer maxMoney);
	List<Map> countInvestByMoney(int pid);

	List<Map> countInvestBySex(int pid);
}
